<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象展开</title>
</head>
<body>
    <!-- Rest 参数与Spread拓展运算符在ES6中已经引入，不
    过ES6 中针对于数组，在ES9中为对象提供了像数组一样的rest参数和拓展运算符
    -->
    <script>
        // function connect({host,port, ...user}){
        //     console.log(host);
        //     console.log(port);
        //     console.log(user);
        // }

        // connect({
        //     host:'127.0.0.1',
        //     port:'3306',
        //     username:'root',
        //     password:'root',
        //     type:'master'
        // });
        const skillOne={
            q:'天音波'
        }

        const sKillTwo = {
            w:'金钟罩'
        }
        const skillThree ={
            e:'天雷破'
        }
        const skillFour ={
            r:'神龙摆尾'
        }

        const mangseng = {...skillOne,...sKillTwo,...skillThree,...skillFour}
        console.log(mangseng);
    </script>
</body>
</html>